package org.example.stream.demo;

import org.example.stream.demo.entity.User;

import java.util.Comparator;
import java.util.List;

public class SortedMain {
    public static void main(String[] args) {
        List<User> list = UserBuilder.bindings();
        System.out.println(list);

        list.stream().sorted(Comparator.comparingInt(User::getAge)).forEach(System.out::println);
    }
}
